package com.ats.str.prm;

/**
 * Common ancestor of StrategyParams members
 *   
 * @author izotov
 *
 */
public abstract class StrPrm<T> {

	protected StrPrm() { super(); }
	
	protected volatile T min;
	public T min() { return min; }
	public void min(T min) { this.min = min; }

	protected volatile T max;
	public T max() { return max; }
	public void max(T max) { this.max = max; }

	protected volatile T value;
	public synchronized T value() { return value; }
	public synchronized T value(T value) { return (this.value = value); }
	
	protected volatile T step;
	public T step() { return step; }
	public void step(T step) { this.step = step; }
	
	protected abstract T increment();
	public abstract T next();
	public abstract boolean done();
	// protected abstract T getNewImpl();
	
	/*
	public static <T> T getNew() 
	throws Exception {  
		Class<T> c = getNewImpl();
		return c.newInstance();
	}
	*/
	
}
